package com.physics.mps.entity.vo.api;

import lombok.*;

import java.io.Serializable;

/**
 * @author mcsoft
 * @date 2023/11/27 11:35
 * @email kuun993@163.com
 * @description 接口返回实体
 */
@Getter
@Setter
@ToString
@NoArgsConstructor
public class Result<T> implements Serializable {

    private static final long serialVersionUID = -781707464410458099L;

    private static final int success = 200;

    private int code;

    private String msg;

    private T data;



    public static<T> Result<T> success(T data) {
        Result<T> result = new Result<>();
        result.setData(data);
        result.setCode(success);
        return result;
    }

}
